<layout name='Layout/layout_main' />
<script type="text/javascript">
	function add() {
		window.open("{:U('add?fid='.$folder_id)}", "_self");
	}

	function del() {
		if (confirm('确定要删除吗?')) {
			sendAjax("{:U('del')}", 'id=' + $("#forum_id").val(), function(data) {
				if (data.status) {
					alert(data.info);
					$("input[name='forum_id']:checkbox:checked").each(function() {
						$(this).parent().parent().hide();
					})
				}
			});
		}
	}


	$(document).ready(function() {
		set_return_url();
		$(".input-date").datepicker();
	}); 
</script>
<form id="form_search" method='post' class="form-horizontal">
	<div class="title panel panel-default">
		<div class="panel-body">
			<h3 class="col-md-8">{$folder_name}</h3>
			<div class="col-md-4 pull-right">
				<div class="search_box">
					<div class="input-group ">
						<input  class="form-control" type="text"  onkeydown="key_search_2();" name="keyword" id="keyword"/>
						<div class="input-group-btn">
							<a class="btn btn-default" onclick="btn_search();" > <i class="icon-search" ></i> </a>
							<a class="btn btn-default" onclick="open_adv_search();" ><i class="icon-angle-down" ></i></a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="adv_search panel panel-default">
		<div class="panel-heading">
			<div class="row">
				<h4 class="col-md-6">高级搜索</h4>
				<div class="col-md-6 text-right">
					<a  class="btn btn-default" onclick="adv_search();">搜索</a>
					<a  class="btn btn-default" onclick="close_adv_search();">关闭</a>
				</div>
			</div>
		</div>
		<div class="panel-body">
			<div class="form-group col-md-6">
				<label class="col-md-4 control-label" for="li_name">标题：</label>
				<div class="col-md-8">
					<input  class="form-control" type="text" id="li_name" name="li_name" >
				</div>
			</div>

			<div class="form-group col-md-6">
				<label class="col-md-4 control-label" for="li_content">内容：</label>
				<div class="col-md-8">
					<input  class="form-control" type="text" id="li_content" name="li_content" >
				</div>
			</div>

			<div class="form-group col-md-6">
				<label class="col-md-4 control-label" for="eq_user_name">登录人：</label>
				<div class="col-md-8">
					<input  class="form-control" type="text" id="eq_user_name" name="eq_user_name" >
				</div>
			</div>

			<div class="form-group col-md-6">
				<label class="col-md-4 control-label" for="be_create_time">登录时间：</label>
				<div class="col-md-8">
					<input  class="form-control input-date" type="text" name="be_create_time" id="be_create_time"    readonly="readonly">
					-
					<input class="form-control input-date" type="text" name="en_create_time" id="en_create_time" readonly="readonly"  >
				</div>
			</div>
		</div>
	</div>
</form>

<div class="operate panel panel-default">
	<div class="panel-body">
		<div class="pull-right">
			<if condition="$auth['write']">
				<a  onclick="add();" class="btn btn-default">发帖</a>
			</if>
		</div>

		<div class="pull-left">
			<if condition="$auth['admin']">
				<a onclick="mark('del');" class="btn btn-default">删除</a>
				<div class="btn-group">
					<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"> 转移到 <span class="caret"></span> </a>
					<ul class="dropdown-menu">
						{$folder_list}
					</ul>
				</div>
			</if>
		</div>
	</div>
</div>
	<form id="form_data" name="form_data" method='post'>
		<div class="ul-table">
			<ul>
				<li class="thead">
					<span class="checkbox">
						<input  type="checkbox" id="chk_select_all" value="all" onclick="select_all('notice_id[]')"/>
					</span>
					<span class="col-8 right"> 回复/查看</span>
					<span class="col-9 pull-right"> 登录时间 </span>
					<span class="col-6 right"> 登录人 </span>
					<div class="auto">
						主题
					</div>
				</li>
			</ul>
			<if condition="count($list) eq 0 ">
				<ul>
					<li class="tbody text-center">
						<h3>没找到相应的数据</h3>
					</li>
				</ul>
				<else/>
				<ul>
					<foreach name="list" item="vo">
						<li class="tbody">
							<span class="checkbox">
								<input name="notice_id[]" type="checkbox" value="{$vo.id}"/>
							</span>
							<span class="col-8 right text-center"> {$vo.reply}/{$vo.views} </span>
							<span class="col-9 pull-right text-center"> {$vo.create_time|toDate='Y-m-d'} </span>
							<span class="col-6 right text-center"> {$vo.user_name} </span>
							<div class="auto">
								<a href="{:U('read?id='.$vo['id'].'&fid='.$folder_id)}" >{$vo.name}
								<eq name="vo.title|strlen" value="0">
									无标题
								</eq></a>
							</div>
						</li>
					</foreach>
				</ul>
			</if>
		</div>
	</form>
	<div class="page">
		{$page}
	</div>

